<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Vuepress指南 | Symbol博客</title>
    <meta name="generator" content="VuePress 1.8.2">
    <link rel="icon" href="/blog/favicon.ico">
    <meta name="description" content="Symbol同学的博客">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
    
    <link rel="preload" href="/blog/assets/css/0.styles.a6dabdce.css" as="style"><link rel="preload" href="/blog/assets/js/app.4b33f3e4.js" as="script"><link rel="preload" href="/blog/assets/js/3.a3a5bbb5.js" as="script"><link rel="preload" href="/blog/assets/js/1.9ff7b464.js" as="script"><link rel="preload" href="/blog/assets/js/11.1e8bfa59.js" as="script"><link rel="preload" href="/blog/assets/js/8.596fb493.js" as="script"><link rel="prefetch" href="/blog/assets/js/10.76510cb6.js"><link rel="prefetch" href="/blog/assets/js/12.b607cc0d.js"><link rel="prefetch" href="/blog/assets/js/13.5aef30f3.js"><link rel="prefetch" href="/blog/assets/js/14.f8257c4c.js"><link rel="prefetch" href="/blog/assets/js/15.a5587be5.js"><link rel="prefetch" href="/blog/assets/js/16.415c4152.js"><link rel="prefetch" href="/blog/assets/js/17.1a99c426.js"><link rel="prefetch" href="/blog/assets/js/18.1fab9d47.js"><link rel="prefetch" href="/blog/assets/js/19.b7498f5a.js"><link rel="prefetch" href="/blog/assets/js/20.f4fc190e.js"><link rel="prefetch" href="/blog/assets/js/21.136845d7.js"><link rel="prefetch" href="/blog/assets/js/22.55cbb628.js"><link rel="prefetch" href="/blog/assets/js/4.6b5ced56.js"><link rel="prefetch" href="/blog/assets/js/5.37636973.js"><link rel="prefetch" href="/blog/assets/js/6.6b214e37.js"><link rel="prefetch" href="/blog/assets/js/7.1e093103.js"><link rel="prefetch" href="/blog/assets/js/9.7e8e84f7.js">
    <link rel="stylesheet" href="/blog/assets/css/0.styles.a6dabdce.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container no-sidebar" data-v-1156296a><div data-v-1156296a><div id="loader-wrapper" class="loading-wrapper" data-v-d48f4d20 data-v-1156296a data-v-1156296a><div class="loader-main" data-v-d48f4d20><div data-v-d48f4d20></div><div data-v-d48f4d20></div><div data-v-d48f4d20></div><div data-v-d48f4d20></div></div> <!----> <!----></div> <div class="password-shadow password-wrapper-out" style="display:none;" data-v-4e82dffc data-v-1156296a data-v-1156296a><h3 class="title" data-v-4e82dffc data-v-4e82dffc>Symbol博客</h3> <p class="description" data-v-4e82dffc data-v-4e82dffc>Symbol同学的博客</p> <label id="box" class="inputBox" data-v-4e82dffc data-v-4e82dffc><input type="password" value="" data-v-4e82dffc> <span data-v-4e82dffc>Konck! Knock!</span> <button data-v-4e82dffc>OK</button></label> <div class="footer" data-v-4e82dffc data-v-4e82dffc><span data-v-4e82dffc><i class="iconfont reco-theme" data-v-4e82dffc></i> <a target="blank" href="https://vuepress-theme-reco.recoluan.com" data-v-4e82dffc>vuePress-theme-reco</a></span> <span data-v-4e82dffc><i class="iconfont reco-copyright" data-v-4e82dffc></i> <a data-v-4e82dffc><span data-v-4e82dffc>Symbol</span>
            
          <!---->
          2021
        </a></span></div></div> <div class="hide" data-v-1156296a><header class="navbar" data-v-1156296a><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/blog/" class="home-link router-link-active"><img src="/blog/htw.gif" alt="Symbol博客" class="logo"> <span class="site-name">Symbol博客</span></a> <div class="links"><div class="color-picker"><a class="color-button"><i class="iconfont reco-color"></i></a> <div class="color-picker-menu" style="display:none;"><div class="mode-options"><h4 class="title">Choose mode</h4> <ul class="color-mode-options"><li class="dark">dark</li><li class="auto active">auto</li><li class="light">light</li></ul></div></div></div> <div class="search-box"><i class="iconfont reco-search"></i> <input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/blog/" class="nav-link"><i class="iconfont reco-home"></i>
  主页
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-category"></i>
      目录索引
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/blog/categories/Vuepress/" class="nav-link"><i class="undefined"></i>
  Vuepress
</a></li><li class="dropdown-item"><!----> <a href="/blog/categories/CSS/" class="nav-link"><i class="undefined"></i>
  CSS
</a></li><li class="dropdown-item"><!----> <a href="/blog/categories/browser/" class="nav-link"><i class="undefined"></i>
  browser
</a></li><li class="dropdown-item"><!----> <a href="/blog/categories/JavaScript/" class="nav-link"><i class="undefined"></i>
  JavaScript
</a></li><li class="dropdown-item"><!----> <a href="/blog/categories/interview/" class="nav-link"><i class="undefined"></i>
  interview
</a></li><li class="dropdown-item"><!----> <a href="/blog/categories/network/" class="nav-link"><i class="undefined"></i>
  network
</a></li><li class="dropdown-item"><!----> <a href="/blog/categories/ohter/" class="nav-link"><i class="undefined"></i>
  ohter
</a></li></ul></div></div><div class="nav-item"><a href="/blog/tag/" class="nav-link"><i class="iconfont reco-tag"></i>
  标签索引
</a></div><div class="nav-item"><a href="/blog/timeline/" class="nav-link"><i class="iconfont reco-date"></i>
  时间线
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-message"></i>
      Contact
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://gitee.com/regan888/blog" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont reco-github"></i>
  GitHub
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask" data-v-1156296a></div> <aside class="sidebar" data-v-1156296a><div class="personal-info-wrapper" data-v-828910c6 data-v-1156296a><img src="/blog/avatar.jpg" alt="author-avatar" class="personal-img" data-v-828910c6> <h3 class="name" data-v-828910c6>
    Symbol
  </h3> <div class="num" data-v-828910c6><div data-v-828910c6><h3 data-v-828910c6>12</h3> <h6 data-v-828910c6>Articles</h6></div> <div data-v-828910c6><h3 data-v-828910c6>7</h3> <h6 data-v-828910c6>Tags</h6></div></div> <ul class="social-links" data-v-828910c6></ul> <hr data-v-828910c6></div> <nav class="nav-links"><div class="nav-item"><a href="/blog/" class="nav-link"><i class="iconfont reco-home"></i>
  主页
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-category"></i>
      目录索引
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/blog/categories/Vuepress/" class="nav-link"><i class="undefined"></i>
  Vuepress
</a></li><li class="dropdown-item"><!----> <a href="/blog/categories/CSS/" class="nav-link"><i class="undefined"></i>
  CSS
</a></li><li class="dropdown-item"><!----> <a href="/blog/categories/browser/" class="nav-link"><i class="undefined"></i>
  browser
</a></li><li class="dropdown-item"><!----> <a href="/blog/categories/JavaScript/" class="nav-link"><i class="undefined"></i>
  JavaScript
</a></li><li class="dropdown-item"><!----> <a href="/blog/categories/interview/" class="nav-link"><i class="undefined"></i>
  interview
</a></li><li class="dropdown-item"><!----> <a href="/blog/categories/network/" class="nav-link"><i class="undefined"></i>
  network
</a></li><li class="dropdown-item"><!----> <a href="/blog/categories/ohter/" class="nav-link"><i class="undefined"></i>
  ohter
</a></li></ul></div></div><div class="nav-item"><a href="/blog/tag/" class="nav-link"><i class="iconfont reco-tag"></i>
  标签索引
</a></div><div class="nav-item"><a href="/blog/timeline/" class="nav-link"><i class="iconfont reco-date"></i>
  时间线
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-message"></i>
      Contact
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://gitee.com/regan888/blog" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont reco-github"></i>
  GitHub
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li></ul></div></div> <!----></nav> <!----> </aside> <div class="password-shadow password-wrapper-in" style="display:none;" data-v-4e82dffc data-v-1156296a><h3 class="title" data-v-4e82dffc data-v-4e82dffc>Vuepress指南</h3> <!----> <label id="box" class="inputBox" data-v-4e82dffc data-v-4e82dffc><input type="password" value="" data-v-4e82dffc> <span data-v-4e82dffc>Konck! Knock!</span> <button data-v-4e82dffc>OK</button></label> <div class="footer" data-v-4e82dffc data-v-4e82dffc><span data-v-4e82dffc><i class="iconfont reco-theme" data-v-4e82dffc></i> <a target="blank" href="https://vuepress-theme-reco.recoluan.com" data-v-4e82dffc>vuePress-theme-reco</a></span> <span data-v-4e82dffc><i class="iconfont reco-copyright" data-v-4e82dffc></i> <a data-v-4e82dffc><span data-v-4e82dffc>Symbol</span>
            
          <!---->
          2021
        </a></span></div></div> <div data-v-1156296a><main class="page"><section><div class="page-title"><h1 class="title">Vuepress指南</h1> <div data-v-1ff7123e><i class="iconfont reco-account" data-v-1ff7123e><span data-v-1ff7123e>Admin</span></i> <i class="iconfont reco-date" data-v-1ff7123e><span data-v-1ff7123e>3/22/2021</span></i> <!----> <i class="tags iconfont reco-tag" data-v-1ff7123e><span class="tag-item" data-v-1ff7123e>Vuepress</span></i></div></div> <div class="theme-reco-content content__default"><h3 id="vuepress指南">Vuepress指南</h3> <h3 id="目录">目录</h3> <div class="language- line-numbers-mode"><pre class="language-text"><code>[[toc]]
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p></p><div class="table-of-contents"><ul><li><a href="#vuepress指南">Vuepress指南</a></li><li><a href="#目录">目录</a></li><li><a href="#指定代码行高亮">指定代码行高亮</a></li><li><a href="#导入代码段">导入代码段</a></li><li><a href="#表格">表格</a></li><li><a href="#tip提示">tip提示</a></li><li><a href="#进阶配置">进阶配置</a></li><li><a href="#访问网站以及页面的数据">访问网站以及页面的数据</a></li><li><a href="#badge-的使用">Badge 的使用</a></li><li><a href="#版本信息-badge-text-beta-type-warning">版本信息 <span class="badge warning" style="vertical-align:top;" data-v-08862138>beta</span></a></li></ul></div><p></p> <h3 id="指定代码行高亮">指定代码行高亮</h3> <div class="language-html line-numbers-mode"><div class="highlight-lines"><br><br><div class="highlighted"> </div><div class="highlighted"> </div><br><br><br><br><br></div><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>ul</span><span class="token punctuation">&gt;</span></span>
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>li</span>
    <span class="token attr-name">v-for</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>todo in todos<span class="token punctuation">&quot;</span></span>
    <span class="token attr-name">:key</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>todo.id<span class="token punctuation">&quot;</span></span>
  <span class="token punctuation">&gt;</span></span>
    {{ todo.text }}
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>li</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>ul</span><span class="token punctuation">&gt;</span></span>
</code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br></div></div><p>通过配置来为每个代码块显示行号：</p> <div class="language-js line-numbers-mode"><pre class="language-js"><code>module<span class="token punctuation">.</span>exports <span class="token operator">=</span> <span class="token punctuation">{</span>
  markdown<span class="token operator">:</span> <span class="token punctuation">{</span>
    lineNumbers<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br></div></div><h3 id="导入代码段">导入代码段</h3> <p>你可以通过下述的语法导入已经存在的文件中的代码段：</p> <div class="language-js line-numbers-mode"><div class="highlight-lines"><br><br><br><br><br><div class="highlighted"> </div><div class="highlighted"> </div><div class="highlighted"> </div><div class="highlighted"> </div><div class="highlighted"> </div><div class="highlighted"> </div><div class="highlighted"> </div><div class="highlighted"> </div><div class="highlighted"> </div><div class="highlighted"> </div><div class="highlighted"> </div><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br></div><pre class="language-js"><code><span class="token comment">// #region snippet</span>
<span class="token keyword">function</span> <span class="token function">foo</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token keyword">return</span> <span class="token punctuation">(</span><span class="token punctuation">{</span>
      dest<span class="token operator">:</span> <span class="token string">'../../vuepress'</span><span class="token punctuation">,</span>
      locales<span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token string">'/'</span><span class="token operator">:</span> <span class="token punctuation">{</span>
          lang<span class="token operator">:</span> <span class="token string">'en-US'</span><span class="token punctuation">,</span>
          title<span class="token operator">:</span> <span class="token string">'VuePress'</span><span class="token punctuation">,</span>
          description<span class="token operator">:</span> <span class="token string">'Vue-powered Static Site Generator'</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token string">'/zh/'</span><span class="token operator">:</span> <span class="token punctuation">{</span>
          lang<span class="token operator">:</span> <span class="token string">'zh-CN'</span><span class="token punctuation">,</span>
          title<span class="token operator">:</span> <span class="token string">'VuePress'</span><span class="token punctuation">,</span>
          description<span class="token operator">:</span> <span class="token string">'Vue 驱动的静态网站生成器'</span>
        <span class="token punctuation">}</span>
      <span class="token punctuation">}</span><span class="token punctuation">,</span>
      head<span class="token operator">:</span> <span class="token punctuation">[</span>
        <span class="token punctuation">[</span><span class="token string">'link'</span><span class="token punctuation">,</span> <span class="token punctuation">{</span> rel<span class="token operator">:</span> <span class="token string">'icon'</span><span class="token punctuation">,</span> href<span class="token operator">:</span> <span class="token template-string"><span class="token template-punctuation string">`</span><span class="token string">/logo.png</span><span class="token template-punctuation string">`</span></span> <span class="token punctuation">}</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token punctuation">[</span><span class="token string">'link'</span><span class="token punctuation">,</span> <span class="token punctuation">{</span> rel<span class="token operator">:</span> <span class="token string">'manifest'</span><span class="token punctuation">,</span> href<span class="token operator">:</span> <span class="token string">'/manifest.json'</span> <span class="token punctuation">}</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token punctuation">[</span><span class="token string">'meta'</span><span class="token punctuation">,</span> <span class="token punctuation">{</span> name<span class="token operator">:</span> <span class="token string">'theme-color'</span><span class="token punctuation">,</span> content<span class="token operator">:</span> <span class="token string">'#3eaf7c'</span> <span class="token punctuation">}</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token punctuation">[</span><span class="token string">'meta'</span><span class="token punctuation">,</span> <span class="token punctuation">{</span> name<span class="token operator">:</span> <span class="token string">'apple-mobile-web-app-capable'</span><span class="token punctuation">,</span> content<span class="token operator">:</span> <span class="token string">'yes'</span> <span class="token punctuation">}</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token punctuation">[</span><span class="token string">'meta'</span><span class="token punctuation">,</span> <span class="token punctuation">{</span> name<span class="token operator">:</span> <span class="token string">'apple-mobile-web-app-status-bar-style'</span><span class="token punctuation">,</span> content<span class="token operator">:</span> <span class="token string">'black'</span> <span class="token punctuation">}</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token punctuation">[</span><span class="token string">'link'</span><span class="token punctuation">,</span> <span class="token punctuation">{</span> rel<span class="token operator">:</span> <span class="token string">'apple-touch-icon'</span><span class="token punctuation">,</span> href<span class="token operator">:</span> <span class="token template-string"><span class="token template-punctuation string">`</span><span class="token string">/icons/apple-touch-icon-152x152.png</span><span class="token template-punctuation string">`</span></span> <span class="token punctuation">}</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token punctuation">[</span><span class="token string">'link'</span><span class="token punctuation">,</span> <span class="token punctuation">{</span> rel<span class="token operator">:</span> <span class="token string">'mask-icon'</span><span class="token punctuation">,</span> href<span class="token operator">:</span> <span class="token string">'/icons/safari-pinned-tab.svg'</span><span class="token punctuation">,</span> color<span class="token operator">:</span> <span class="token string">'#3eaf7c'</span> <span class="token punctuation">}</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token punctuation">[</span><span class="token string">'meta'</span><span class="token punctuation">,</span> <span class="token punctuation">{</span> name<span class="token operator">:</span> <span class="token string">'msapplication-TileImage'</span><span class="token punctuation">,</span> content<span class="token operator">:</span> <span class="token string">'/icons/msapplication-icon-144x144.png'</span> <span class="token punctuation">}</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token punctuation">[</span><span class="token string">'meta'</span><span class="token punctuation">,</span> <span class="token punctuation">{</span> name<span class="token operator">:</span> <span class="token string">'msapplication-TileColor'</span><span class="token punctuation">,</span> content<span class="token operator">:</span> <span class="token string">'#000000'</span> <span class="token punctuation">}</span><span class="token punctuation">]</span>
      <span class="token punctuation">]</span>
    <span class="token punctuation">}</span><span class="token punctuation">)</span>
  <span class="token punctuation">}</span>
  <span class="token comment">// #endregion snippet</span>
  
  <span class="token keyword">export</span> <span class="token keyword">default</span> foo</code></pre><div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br></div></div><h3 id="表格">表格</h3> <table><thead><tr><th>Tables</th> <th style="text-align:center;">Are</th> <th style="text-align:right;">Cool</th></tr></thead> <tbody><tr><td>col 3 is</td> <td style="text-align:center;">right-aligned</td> <td style="text-align:right;">$1600</td></tr> <tr><td>col 2 is</td> <td style="text-align:center;">centered</td> <td style="text-align:right;">$12</td></tr> <tr><td>zebra stripes</td> <td style="text-align:center;">are neat</td> <td style="text-align:right;">$1</td></tr></tbody></table> <p>输入</p> <div class="language- line-numbers-mode"><pre class="language-text"><code>:tada: :100:
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>输出:
🎉 💯</p> <p>可以在这个<a href="https://github.com/markdown-it/markdown-it-emoji/blob/master/lib/data/full.json" target="_blank" rel="noopener noreferrer">列表<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>找到所有可用的 Emoji。</p> <h3 id="tip提示">tip提示</h3> <div class="custom-block tip"><p class="title"></p><p>这是一个提示</p></div><div class="custom-block warning"><p class="title"></p><p>这是一个警告</p></div><div class="custom-block danger"><p class="title"></p><p>这是一个危险警告</p></div><details class="custom-block details"><summary>See More</summary> <p>这是一个详情块，在 IE / Edge 中不生效</p></details> <div class="language- line-numbers-mode"><pre class="language-text"><code>::: tip
这是一个提示
:::

::: warning
这是一个警告
:::

::: danger
这是一个危险警告
:::

::: details
这是一个详情块，在 IE / Edge 中不生效
:::
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br></div></div><p>你也可以自定义块中的标题：</p> <div class="custom-block danger"><p class="title">STOP</p><p>危险区域，禁止通行</p></div><details class="custom-block details"><summary>点击查看代码</summary> <div class="language-js line-numbers-mode"><pre class="language-js"><code>console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token string">'你好，VuePress！'</span><span class="token punctuation">)</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div></details> <details class="custom-block details"><summary>点击查看样式</summary> <div class="language-css line-numbers-mode"><pre class="language-css"><code><span class="token selector">.active</span> <span class="token punctuation">{</span>
    <span class="token property">font-size</span><span class="token punctuation">:</span>23px<span class="token punctuation">;</span>
    <span class="token property">color</span><span class="token punctuation">:</span>red<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div></details> <div class="custom-block tip"><p class="title">恭喜你</p><p>你又进步了，继续保持！</p></div><h3 id="进阶配置">进阶配置</h3> <p>VuePress 使用 <a href="https://github.com/markdown-it/markdown-it" target="_blank" rel="noopener noreferrer">markdown-it<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> 来渲染 Markdown，上述大多数的拓展也都是通过自定义的插件实现的。想要进一步的话，你可以通过 .vuepress/config.js 的 markdown 选项，来对当前的 markdown-it 实例做一些自定义的配置：</p> <div class="language-js line-numbers-mode"><pre class="language-js"><code>module<span class="token punctuation">.</span>exports <span class="token operator">=</span> <span class="token punctuation">{</span>
  markdown<span class="token operator">:</span> <span class="token punctuation">{</span>
    <span class="token comment">// markdown-it-anchor 的选项</span>
    anchor<span class="token operator">:</span> <span class="token punctuation">{</span> permalink<span class="token operator">:</span> <span class="token boolean">false</span> <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token comment">// markdown-it-toc 的选项</span>
    toc<span class="token operator">:</span> <span class="token punctuation">{</span> includeLevel<span class="token operator">:</span> <span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">]</span> <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token function-variable function">extendMarkdown</span><span class="token operator">:</span> <span class="token parameter">md</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
      <span class="token comment">// 使用更多的 markdown-it 插件!</span>
      md<span class="token punctuation">.</span><span class="token function">use</span><span class="token punctuation">(</span><span class="token function">require</span><span class="token punctuation">(</span><span class="token string">'markdown-it-xxx'</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
    <span class="token punctuation">}</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br></div></div><h3 id="访问网站以及页面的数据">访问网站以及页面的数据</h3> <div class="language-js line-numbers-mode"><pre class="language-js"><code><span class="token punctuation">{</span><span class="token punctuation">{</span> $page <span class="token punctuation">}</span><span class="token punctuation">}</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><blockquote><p>输出：</p></blockquote> <p>{
  &quot;title&quot;: &quot;Vuepress指南&quot;,
  &quot;frontmatter&quot;: {
    &quot;title&quot;: &quot;Vuepress指南&quot;,
    &quot;date&quot;: &quot;2021-03-22T00:00:00.000Z&quot;,
    &quot;author&quot;: &quot;Admin&quot;,
    &quot;categories&quot;: [
      &quot;Vuepress&quot;
    ],
    &quot;tags&quot;: [
      &quot;Vuepress&quot;
    ],
    &quot;sidebar&quot;: &quot;auto&quot;
  },
  &quot;regularPath&quot;: &quot;/blogs/&quot;,
  &quot;relativePath&quot;: &quot;blogs/README.md&quot;,
  &quot;key&quot;: &quot;v-304ef895&quot;,
  &quot;path&quot;: &quot;/blogs/&quot;,
  &quot;headers&quot;: [
    {
      &quot;level&quot;: 3,
      &quot;title&quot;: &quot;Vuepress指南&quot;,
      &quot;slug&quot;: &quot;vuepress指南&quot;
    },
    {
      &quot;level&quot;: 3,
      &quot;title&quot;: &quot;目录&quot;,
      &quot;slug&quot;: &quot;目录&quot;
    },
    {
      &quot;level&quot;: 3,
      &quot;title&quot;: &quot;指定代码行高亮&quot;,
      &quot;slug&quot;: &quot;指定代码行高亮&quot;
    },
    {
      &quot;level&quot;: 3,
      &quot;title&quot;: &quot;导入代码段&quot;,
      &quot;slug&quot;: &quot;导入代码段&quot;
    },
    {
      &quot;level&quot;: 3,
      &quot;title&quot;: &quot;表格&quot;,
      &quot;slug&quot;: &quot;表格&quot;
    },
    {
      &quot;level&quot;: 3,
      &quot;title&quot;: &quot;tip提示&quot;,
      &quot;slug&quot;: &quot;tip提示&quot;
    },
    {
      &quot;level&quot;: 3,
      &quot;title&quot;: &quot;进阶配置&quot;,
      &quot;slug&quot;: &quot;进阶配置&quot;
    },
    {
      &quot;level&quot;: 3,
      &quot;title&quot;: &quot;访问网站以及页面的数据&quot;,
      &quot;slug&quot;: &quot;访问网站以及页面的数据&quot;
    },
    {
      &quot;level&quot;: 3,
      &quot;title&quot;: &quot;Badge 的使用&quot;,
      &quot;slug&quot;: &quot;badge-的使用&quot;
    },
    {
      &quot;level&quot;: 3,
      &quot;title&quot;: &quot;版本信息&quot;,
      &quot;slug&quot;: &quot;版本信息&quot;
    }
  ]
}</p> <h3 id="badge-的使用">Badge 的使用</h3> <div class="language-md line-numbers-mode"><pre class="language-md"><code><span class="token title important"><span class="token punctuation">###</span> 版本信息 &lt;Badge text=&quot;beta&quot; type=&quot;warning&quot;/&gt;</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><blockquote><p>输出：</p></blockquote> <h3 id="版本信息">版本信息 <span class="badge warning" style="vertical-align:top;" data-v-08862138>beta</span></h3></div></section> <footer class="page-edit"><!----> <!----></footer> <!----> <div class="comments-wrapper"><!----></div> <ul class="side-bar sub-sidebar-wrapper" style="width:12rem;" data-v-70334359><li class="level-3" data-v-70334359><a href="/blog/blogs/#vuepress指南" class="sidebar-link reco-side-vuepress指南" data-v-70334359>Vuepress指南</a></li><li class="level-3" data-v-70334359><a href="/blog/blogs/#目录" class="sidebar-link reco-side-目录" data-v-70334359>目录</a></li><li class="level-3" data-v-70334359><a href="/blog/blogs/#指定代码行高亮" class="sidebar-link reco-side-指定代码行高亮" data-v-70334359>指定代码行高亮</a></li><li class="level-3" data-v-70334359><a href="/blog/blogs/#导入代码段" class="sidebar-link reco-side-导入代码段" data-v-70334359>导入代码段</a></li><li class="level-3" data-v-70334359><a href="/blog/blogs/#表格" class="sidebar-link reco-side-表格" data-v-70334359>表格</a></li><li class="level-3" data-v-70334359><a href="/blog/blogs/#tip提示" class="sidebar-link reco-side-tip提示" data-v-70334359>tip提示</a></li><li class="level-3" data-v-70334359><a href="/blog/blogs/#进阶配置" class="sidebar-link reco-side-进阶配置" data-v-70334359>进阶配置</a></li><li class="level-3" data-v-70334359><a href="/blog/blogs/#访问网站以及页面的数据" class="sidebar-link reco-side-访问网站以及页面的数据" data-v-70334359>访问网站以及页面的数据</a></li><li class="level-3" data-v-70334359><a href="/blog/blogs/#badge-的使用" class="sidebar-link reco-side-badge-的使用" data-v-70334359>Badge 的使用</a></li><li class="level-3" data-v-70334359><a href="/blog/blogs/#版本信息" class="sidebar-link reco-side-版本信息" data-v-70334359>版本信息</a></li></ul></main> <!----></div></div></div></div><div class="global-ui"><div class="back-to-ceiling" style="right:1rem;bottom:6rem;width:2.5rem;height:2.5rem;border-radius:.25rem;line-height:2.5rem;display:none;" data-v-c6073ba8 data-v-c6073ba8><svg t="1574745035067" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5404" class="icon" data-v-c6073ba8><path d="M526.60727968 10.90185116a27.675 27.675 0 0 0-29.21455937 0c-131.36607665 82.28402758-218.69155461 228.01873535-218.69155402 394.07834331a462.20625001 462.20625001 0 0 0 5.36959153 69.94390903c1.00431239 6.55289093-0.34802892 13.13561351-3.76865779 18.80351572-32.63518765 54.11355614-51.75690182 118.55860487-51.7569018 187.94566865a371.06718723 371.06718723 0 0 0 11.50484808 91.98906777c6.53300375 25.50556257 41.68394495 28.14064038 52.69160883 4.22606766 17.37162448-37.73630017 42.14135425-72.50938081 72.80769204-103.21549295 2.18761121 3.04276886 4.15646224 6.24463696 6.40373557 9.22774369a1871.4375 1871.4375 0 0 0 140.04691725 5.34970492 1866.36093723 1866.36093723 0 0 0 140.04691723-5.34970492c2.24727335-2.98310674 4.21612437-6.18497483 6.3937923-9.2178004 30.66633723 30.70611158 55.4360664 65.4791928 72.80769147 103.21549355 11.00766384 23.91457269 46.15860503 21.27949489 52.69160879-4.22606768a371.15156223 371.15156223 0 0 0 11.514792-91.99901164c0-69.36717486-19.13165746-133.82216804-51.75690182-187.92578088-3.42062944-5.66790279-4.76302748-12.26056868-3.76865837-18.80351632a462.20625001 462.20625001 0 0 0 5.36959269-69.943909c-0.00994388-166.08943902-87.32547796-311.81420293-218.6915546-394.09823051zM605.93803103 357.87693858a93.93749974 93.93749974 0 1 1-187.89594924 6.1e-7 93.93749974 93.93749974 0 0 1 187.89594924-6.1e-7z" p-id="5405" data-v-c6073ba8></path><path d="M429.50777625 765.63860547C429.50777625 803.39355007 466.44236686 1000.39046097 512.00932183 1000.39046097c45.56695499 0 82.4922232-197.00623328 82.5015456-234.7518555 0-37.75494459-36.9345906-68.35043303-82.4922232-68.34111062-45.57627738-0.00932239-82.52019037 30.59548842-82.51086798 68.34111062z" p-id="5406" data-v-c6073ba8></path></svg></div></div></div>
    <script src="/blog/assets/js/app.4b33f3e4.js" defer></script><script src="/blog/assets/js/3.a3a5bbb5.js" defer></script><script src="/blog/assets/js/1.9ff7b464.js" defer></script><script src="/blog/assets/js/11.1e8bfa59.js" defer></script><script src="/blog/assets/js/8.596fb493.js" defer></script>
  </body>
</html>
